Skip navigation
SASEKUMAR
Currently Being Moderated

EvaluateXPathExpression in VB.Net

Jul 9, 2011 12:08 AM

Hi All,

 

We are using VB.net  for development and there is one function called " EvaluateXPathExpression" for InDesign.XMLElement.Trying to use this in VB.net and throws "The requested member of the collection does not exist." error.

 

"Function EvaluateXPathExpression(Using As String, Optional PrefixMappingTable As Object = Nothing) As InDesign.Objects

     Member of InDesign.XMLElement"

 

Is this accessible in VB.Net? Any sample or direction is helpful.

 

        IdApp = CreateObject("InDesign.Application.CS5.5")

        IdApp.Activate()

        IdApp.ScriptPreferences.UserInteractionLevel = InDesign.idUserInteractionLevels.idNeverInteract

        IdDoc = IdApp.ActiveDocument

        Dim xmlElems As InDesign.XMLElement = IdDoc.XMLElements(0).EvaluateXPathExpression("//body")

 

Thanks

Selvakumar

 
Replies
  • Currently Being Moderated
    Jul 26, 2012 3:13 AM   in reply to SASEKUMAR

    Try this

     

                  

    IdApp = CreateObject("InDesign.Application.CS5.5") 

    IdApp.Activate()

    IdApp.ScriptPreferences.UserInteractionLevel = InDesign.idUserInteractionLevels.idNeverInteract

    IdDoc = IdApp.ActiveDocument

    Dim xmlElems = IdDoc.XMLElements(0).EvaluateXPathExpression("//body")

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points