Element of XML

Ehernandez
Member Posts: 3
Hi, I need help, I try read a xml document but i dont have idea how I can obtain the text of a Element, I have the next xml
I use NAV 2016.
I like obtain the value of <UUID> and save a Text Variable,
I use this for the attributes
thanks for the help
I use NAV 2016.
<?xml version="1.0"?> <Acuse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" RfcEmisor="FLI081012K2" Fecha="2011-05-04T18:02:32.5834309"> <Folios xmlns="http://cancelacfd.sat.gob.mx"> <UUID>EC71541D-7E57-7E57-7E57-58B200D42</UUID> <EstatusUUID>202</EstatusUUID> </Folios> <Signature Id="SelloSAT" xmlns="http://www.w3.org/2000/09/xmldsig#"> <SignedInfo> <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315" /> <SignatureMethod Algorithm="http://www.w3.org/2001/04/xmldsig-more#hmac-sha512" /> <Reference URI="">
I like obtain the value of <UUID> and save a Text Variable,
I use this for the attributes
rutasencilla:='F:\NAV2016\CANCELADO-FE-FACMX907.xml'; XMLDoc.Load(rutasencilla); NamespaceManager := NamespaceManager.XmlNamespaceManager(XMLDoc.NameTable); //http://cancelacfd.sat.gob.mx NamespaceManager.AddNamespace('folios','http://cancelacfd.sat.gob.mx'); NamespaceManager.AddNamespace('Acuse','http://www.w3.org/2001/XMLSchema-instance'); XMLCurrNode := XMLDoc.SelectSingleNode('Acuse',NamespaceManager); XMLDOMNamedNodeMap := XMLCurrNode.Attributes; XMLCurrNode := XMLDOMNamedNodeMap.GetNamedItem('Fecha'); MESSAGE(FORMAT(XMLCurrNode.Value));
thanks for the help

0
Answers
-
Try:
XMLCurrNode.Text instead of XMLCurrNode.Value
That should help.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions