Sorry I had attached code along with File but now I see file is not attached and even code is blank. As I remove  from xml file , document is successfully parsed.
*******************************************************
* ReadXML
*
* Read an XML file of a structured format that would
* be similiar to an INI settings file, traverses
* through the entire structure as an example
*******************************************************
Create Cursor tmpRange(Agroup c(50),Pagroup c(50),SORTPOSITION N(6))
bb=ReadXML('C:\Users\om\Downloads\Datagroup.xml')
Function ReadXML
Lparameters pcXMLFile
Local oXML, oRootNode, cParentName, cValue, cName, nType, nNumNodes, ;
cRootTagName, oNodeList, oNode, bHasChild, cTagName, ;
oChildNodeList, nChildLen, nPass, oChildNode, oAttributeList, ;
cTextData, nTextDataLen, cAttrName, cAttrValue, nNumAttr
* Start out by creating the actual xml parser object
oXML = Createobject('MSXML2.DomDocument')
* Wait for the document to be parsed and loaded
oXML.Async = .F.
* Load the document into the object, if this was a stream instead
* of a file name, we would use loadXML(cCharStream)
If oXML.Load(Filev)
*- Good No Error reported
Else
* The document failed to load.
Local strErrText
*LOCAL xPE As MSXML2.IXMLDOMParseError
* Obtain the ParseError object
xPE = oXML.parseError
With xPE
strErrText = "Your XML Document failed to load" + ;
"due the following error." + Chr(13) + ;
"Error #: " + Transform(.errorCode) + ": " + xPE.reason + ;
"Line #: " +Transform(.Line) + Chr(13) +;
"Line Position: " + Transform(.linepos )+ Chr(13) + ;
"Position In File: " + Transform(.filepos )+ Chr(13) + ;
"Source Text: " + .srcText + Chr(13) + ;
"Document URL: " + .url
ENDWITH
Messagebox(strErrText)
Retu
Endif
* Get the root element
oRootNode = oXML.documentElement
* What is the root tag name?
cRootTagName = oRootNode.tagName
* Get all the nodes in the document with the special '*'
* parameter, we could just pass in a tag name to get the
* node list for that specific tag
oNodeList = oRootNode.getElementsByTagName("*")
* How many nodes did we retrieve
nNumNodes = oNodeList.Length
* Go through all the nodes in the NodeList.
* Note that Attribute and Character/Text Data is NOT
* counted as part of this list, you must get that data
* separately, this list only contains tag elements
* Note that this uses C like array positioning by
* starting at zero
For nPos = 0 To (nNumNodes-1) Step 1
* Get the next node in the list
oNode = oNodeList.Item(nPos)
* What is the value of this node, if it is an element
* then this value is the tag name
cParentName = oNode.nodeName
* Does this node have any children?
bHasChild = oNode.hasChildNodes()
* What is the node type, element or text?
nType = oNode.nodeType
If cParentName = 'GROUP'
Select tmpRange
Append Blank
Replace Agroup With oNode.Attributes.getNamedItem('NAME').Text
Strtofile('Group : ' +oNode.Attributes.getNamedItem('NAME').Text + Chr(13),'Om.txt',1)
Endif
If nType = 1
* This is an element/tag so it may have
* attributes. We can get those attributes
* by name or in a list.
* Since this example function traverses thru
* the xml tree, it would not be very efficient
* to query every single node for a particular
* attribute, this is just to show how it could
* be done.
* if the attribute does not exist, returns .NULL.
* otherwise we get the attribute value
cAttrValue = oNode.getAttribute("my_attribute")
* cAttrValue = oNode.getAttribute("PARENT")
* We could also get a NamedNodeMap accessing
* the attributes property
oAttributeList = oNode.Attributes
* how many attributes do we have
nNumAttr = oAttributeList.Length
* Get the attribute using the list
cAttrValue = oAttributeList.getNamedItem("my_attribute")
*STRTOFILE(cParentName + '---' + ALLTRIM('') + CHR(13)+ ',','Om.txt',1)
Endif
If bHasChild
* Ok, we know we have children but what type are they?
* Just test the first one to see if it is something
* other than an element and if so, get it
If oNode.firstChild.nodeType != 1
* We know we have something other than an element, get
* the tag name of the element we are parsing
cTagName = oNode.tagName
* Get the node list and determine how man child
* nodes this element has
oChildNodeList = oNode.childNodes
nChildLen = oChildNodeList.Length
* Go through all child nodes and grab the non-element
* data to do with what you like
For nPass = 0 To (nChildLen-1) Step 1
oChildNode = oChildNodeList.Item(nPass)
cValue = oChildNode.nodeValue
cName = oChildNode.nodeName
nType = oChildNode.nodeType
bHasChild = oChildNode.hasChildNodes()
* For now just look for text types, other
* types can be added later if needed
Do Case
Case nType = 3
* Text node
cTextData = oChildNode.Data
nTextDataLen = oChildNode.Length
Case nType = 4
* CData Section node
cTextData = oChildNode.Data
nTextDataLen = oChildNode.Length
Otherwise
* Some other node we don't care about
* right now
Endcase
Strtofile(cTagName + ':' + Alltrim(cTextData) + ',','Om.txt',1)
*?cTextData
Do Case
Case Upper(Allt(cTagName)) = 'PARENT'
Select tmpRange
Replace Pagroup With Alltrim(cTextData)
Case Upper(Allt(cTagName)) = 'SORTPOSITION'
Select tmpRange
Replace &cTagName With Val(cTextData)
Endcase
Endfor
Strtofile(Chr(13),'Om.txt',1)
Endif
Endif
Endfor
Select tmpRange
Brow
Return 0
Endfunc